<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<div class="container">
	<div class="row-fluid box">
	
		<div class="span12">
			<div class="clearfix">
				&nbsp;
			</div>
			
			<table class="table table-striped table-hover">
				<tr>
					<th>컨텐츠 ID</th>
					<th>컨텐츠 명</th>
					<th>등록자</th>
					<th>등록일</th>
				</tr>
				<c:forEach items="${ list }" var="content">
					<tr class="success">
					    <td>${content.CONTENTS_ID}</td>
					    <td>${content.CONTENTS_NM}</td>
					    <td>${content.MEMBER_NAME}</td>
					    <td>${content.REG_DT}</td>
					 </tr>
				</c:forEach>
			</table>
			
			<div class="clearfix">
				<div class="pull-right">
					<button class="btn btn-inverse btn-small btn-url" data-url="/ouat_admin/contents/create.do">컨텐츠 등록</button>
				</div>
			</div>
			
			<c:if test="${ not empty pageLink }">
			<div class="pagination pagination-centered">
				<ul>
					<c:if test="${ 0 ne pageLink.pagePrev }">
					<li><a href="/ouat_admin/contents/list.do?pageNum=${ pageLink.pagePrev }${ empty search.search? '' : search.search }">Prev</a></li>
					</c:if>
					<c:forEach items="${ pageLink.pageList }" var="page" >
					<li data-page-num="${ page.pageNum }"><a href="/ouat_admin/contents/list.do?pageNum=${ page.pageNum }${ empty search.search? '' : search.search }">${ page.pageNum }</a></li>
					</c:forEach>
					<c:if test="${ 0 ne pageLink.pageNext }">
					<li><a href="/ouat_admin/contents/list.do?pageNum=${ pageLink.pageNext }${ empty search.search? '' : search.search }">Next</a></li>
					</c:if>
				</ul>
			</div>
			</c:if>
	
		</div>
		
	</div>
	<!--/row-->
</div> <!-- /container -->
	